package com.kcwl.carrier.infrastructure.repository.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.kcwl.carrier.domain.entity.*;
import com.kcwl.carrier.infrastructure.repository.po.CarrierInfoPO;
import com.kcwl.carrier.interfaces.dto.CooperateEnterpriseDTO;
import com.kcwl.carrier.interfaces.query.CarrierListQuery;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author 刘旭超
 * @date 2022年07月11日 16:35
 * @Description
 */
public interface CarrierInfoMapper extends BaseMapper<CarrierInfoPO> {
    IPage<SingleCarrierListInfo> querySingleList(Page<SingleCarrierInfoListCondition> page, @Param("vo") SingleCarrierInfoListCondition condition);
    IPage<FirmCarrierListInfo> queryFirmList(Page<FirmCarrierInfoListCondition> page, @Param("vo") FirmCarrierInfoListCondition condition);

    List<CarrierInfo> getCarrierDrivers(@Param("userId") Long userId, @Param("keyWord") String keyWord);

    IPage<CarrierList> getCarrierList(@Param("page") Page<CarrierListQuery> page, @Param("command") CarrierListQuery command);

    IPage<CooperateEnterpriseDTO> queryCooperateEnterpriseList(Page<CooperateEnterpriseCondition> page, @Param("vo") CooperateEnterpriseCondition condition);

    List<DriverDispatchInfo> queryDispatchDriverInfo(@Param("mobile") String mobile);

    List<DriverDispatchInfo> queryDispatchDriverAndVehicleInfo(@Param("queryInfo") String queryInfo);

    List<CompanyDispatchInfo> queryDispatchCompanyInfo(@Param("mobile") String mobile);

    List<CompanyDispatchInfo> queryDispatchCompanyAndAuxiliaryInfo(@Param("mobile") String mobile);

    List<CompanyDispatchInfo> queryDispatchAuxiliaryInfo(@Param("mobile") String mobile);

    List<CompanyDispatchInfo> queryDispatchCarrierInfo(@Param("ids") List<Long> ids);

    List<Long> queryDispatchDriverOrg(@Param("userId") Long userId);

    IPage<TmsDriverInfo> queryTmsDriverInfoPage(@Param("page") Page<TmsDriverInfoCondition> page, @Param("vo") TmsDriverInfoCondition command);
}
